package com.zhang.springbootdemo.controller;

import com.zhang.springbootdemo.pojo.Teacher;
import com.zhang.springbootdemo.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TeacherController {

    @Autowired
    private TeacherService teacherService;


    @RequestMapping("/tealist")
    public List<Teacher> teacherList(){
        return teacherService.teacherList();

    }
}
